<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var num=1;
        //num= num + 1;//num加1后，重新赋值给自己

        // 等价于  num= num,+1; 后置运算符
    //先返回原值 ， 再加1
    num++;
    //num = num+1;
    前置运算符
    //先加1  ，再返回
    ++num;
    console.log(num);

    var age= 10;
    console.log(age++  +  5);  // 15 先返回原值
    console.log(age); // 11

    console.log('-----------------');
    var score = 10;
    console.log(++score + 5);//16
    console.log(score);//11
    </script>
</head>
<body>
    
</body>
</html>